package com.example.project.utils;

import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.example.project.vo.model.SaveFile;

import java.util.ArrayList;
import java.util.List;

public class ListUtils {
    public static List<String> returnArray(String jsonArrayString) {
        List<String> array = new ArrayList<>();
        // 1、转List
        JSONArray jsonArray = JSON.parseArray(jsonArrayString);
        for (int i = 0; i < jsonArray.size(); i++) {
            SaveFile saveFie = (SaveFile) jsonArray.get(i);
            array.add(saveFie.getFileUrl());
        }
        return array;
    }
}
